package com.cowain.base.constant;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author songxz
 * @date 2022/11/17
 */
@Component
public class EnvConfig {
    /** 项目名称 */
    @Value("switch.name")
    private  String name;

    /** 版本 */
    @Value("switch.version")
    private  String version;

    /** 版权年份 */
    @Value("switch.copyrightYear")
    private  String copyrightYear;

    /** 上传路径 */
    @Value("switch.profile")
    private  static String profile;

    /** 获取地址开关 */
    @Value("switch.addressEnabled")
    private static  boolean addressEnabled;

    /** 验证码类型 */
    @Value("switch.captchaType")
    private static  String captchaType;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getCopyrightYear() {
        return copyrightYear;
    }

    public void setCopyrightYear(String copyrightYear) {
        this.copyrightYear = copyrightYear;
    }

    public static String getProfile() {
        return profile;
    }

    public static void setProfile(String profile) {
        EnvConfig.profile = profile;
    }

    public static boolean isAddressEnabled() {
        return addressEnabled;
    }

    public static void setAddressEnabled(boolean addressEnabled) {
        EnvConfig.addressEnabled = addressEnabled;
    }

    public static String getCaptchaType() {
        return captchaType;
    }

    public static void setCaptchaType(String captchaType) {
        EnvConfig.captchaType = captchaType;
    }
}
